<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <title>个人信息页面</title>
  <link rel="stylesheet" href="css/base.css" type="text/css">
  <link rel="stylesheet" href="css/style.css" type="text/css">
  <link rel="stylesheet" href="css/mui.min.css" type="text/css">
  <link rel="stylesheet" href="css/app.css" type="text/css">
  <script src="js/jquery-1.11.3.min.js" type="text/javascript"></script>
  <script src="js/vue.min.js" type="text/javascript"></script>
  <script src="js/mui.min.js" type="text/javascript"></script>
  <script src="js/style.js" type="text/javascript"></script>
  <style>
    /*body{*/
    /*	background: #ffffff !important;*/
    /*}*/
    .basicalInfo {
      width: 95%;
      position: relative;
      margin: 20px auto;
      border-radius: 6px;
      background: #ffffff;
      /*border: #ccc solid 1px;*/
      padding:38px 5px 5px 5px;
      box-shadow: #afbec9 0px 0px 12px;
    }
    .portrat{
      width:50px;
      height:50px;
      background: #ffffff;
      left:50%;
      top:-16px;
      margin-left:-25px;
      border-radius: 50%;
      position: absolute;
      box-shadow: #CCCCCC 0px 0px 16px;
    }
    .content{
      text-align: center;
    }
    .content h3{
      font-size:18px;
      text-align: center;
    }
    .mui-ellipsis{
      line-height: 16px;
      margin-bottom: 5px;
    }
    .dieasesInfo,.dangerHigh,.IOF,.questionair{
      margin-bottom: 5px;
    }
    .dieasesInfo,.dangerHigh,.IOF,.questionair,.EQ{
      width:100%;
      clear:both;
      padding: 8px;
      background: #ffffff;
      border-top: #ddd solid 1px;
      border-bottom: #ddd solid 1px;

    }
    .dieasesInfo h4,.dangerHigh h4,.IOF h4,.questionair h4,.EQ h4{
      color:#333333;
      padding-left: 20px;
      position: relative;
      line-height: 18px;
      font-size:16px;
    }


    .dieasesInfo h4:before,.dangerHigh h4:before,.IOF h4:before,.questionair h4:before,.EQ h4:before {
      content: '';
      display: block;
      position: absolute;
      width: 12px;
      height: 12px;
      left: 2px;
      top: 3px;
      border-radius: 50%;
      background: #3783d1;
      /*border: 4px solid #1a1a92;*/
    }
    .dieasesInfo p,.dangerHigh p,.IOF p,.questionair p,.EQ p{
      height:auto;
      overflow:hidden;
      margin-bottom: 0;
    }
    .dieasesInfo p span.left,.dangerHigh p span.left,.IOF p span.left,.questionair p span.left,.EQ p span.left {
      float:left;
    }
    .dieasesInfo p span.right,.dangerHigh p span.right,.IOF p span.right,.questionair p span.right,.EQ p span.right {
      float:right;
    }
  </style>
</head>
<body>
<div class="wrapper" id="app">
  <div class="dieasesInfo">
    <h4> 基本信息</h4>
    <p>
      <span class="left">随访日期:<b>{{losewisdomInfo.answerTime}}</b></span>


      <span class="right" style="margin-right:60px;">
        随访方式:
        <b class="mui-badge mui-badge-primary" v-if="losewisdomInfo.followUpWay == 1">门诊</b>
        <b class="mui-badge mui-badge-primary" v-else-if="losewisdomInfo.followUpWay == 2">家庭</b>
        <b class="mui-badge mui-badge-primary" v-else-if="losewisdomInfo.followUpWay == 3">电话</b>
        <b class="mui-badge mui-badge-primary" v-else-if="losewisdomInfo.followUpWay == 4">集体</b>
        <b class="mui-badge mui-badge-primary" v-else>未选择</b>
      </span>
    </p>
    <p>
<!--      <span class="left">调查员:<b>{{losewisdomInfo.surveyer}}</b></span>-->
<!--      <span class="right">调查员手机号:<b>{{losewisdomInfo.surveyerPhone}}</b></span>-->
    </p>
  </div>
  <div class="IOF">
    <h4> 随诊记录</h4>
    <p class="mui-table-view-cell">
      <span style="width:93%;display:inline-block;">目前症状:</span>
      <span class="ill1" v-for="(item,key) in currentSymptoms" :key="key">
<!--        <input type="checkbox" :name="item.checkName" :checked="item.check" :value="item.id" :id="item.forId" v-model="losewisdomInfo.currentSymptoms"/>-->
        <b class="mui-badge mui-badge-warning" v-model="losewisdomInfo.losecurrentSymptoms" v-show="item.checked">{{item.name}}</b>
<!--        <label v-model="losewisdomInfo.currentSymptoms">{{item.name}}</label>-->
      </span>
    </p>
    <p class="mui-table-view-cell">
      <span style="width:93%;display:inline-block;">
        生活自理能力:
        <b v-if="losewisdomInfo.selfCareAbility == 1">完全自理</b>
        <b v-else-if="losewisdomInfo.selfCareAbility == 2">部分自理</b>
        <b v-else-if="losewisdomInfo.selfCareAbility == 3">完全不能自理</b>
      </span>
    <p class="mui-table-view-cell">
      <span style="width:93%;display:inline-block;">
        社会交往:
        <b v-if="losewisdomInfo.socialInteraction == 1">基本正常</b>
        <b v-else-if="losewisdomInfo.socialInteraction == 2">社交减少</b>
        <b v-else-if="losewisdomInfo.socialInteraction == 3">完全丧失</b>
      </span>
    </p>
    <p class="mui-table-view-cell">
      找回方式:
      <b v-if="losewisdomInfo.retrieveMethod == 1">家属寻找找回</b>
      <b v-else-if="losewisdomInfo.retrieveMethod == 2">报警找回</b>
      <b v-else-if="losewisdomInfo.retrieveMethod == 3">其他</b>
    </p>
  </div>
</div>
<!--	<script src="../js/mui.min.js"></script>-->
<script type="text/javascript" charset="utf-8">
  mui.init({
    swipeBack: true //启用右滑关闭功能
  });
  var vm = new Vue({
    el:"#app",
    data:{
      id:'',
      Info:{},
      losewisdomInfo:[],
      diseasesType:'',
      currentSymptoms:[
        {
          name: '记忆障碍',
          id: '1',
          forId: 'ysxjb1',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '视空间障碍',
          id: '2',
          forId: 'ysxjb2',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '人格障碍',
          id: '3',
          forId: 'ysxjb3',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '工作、学习新知识能力下降',
          id: '4',
          forId: 'ysxjb4',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '社会接触能力减退',
          id: '5',
          forId: 'ysxjb5',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '原已掌握的的知识和技巧出现明显衰退',
          id: '6',
          forId: 'ysxjb6',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '失语、失用、失认',
          id: '7',
          forId: 'ysxjb7',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '行为和精神异常',
          id: '8',
          forId: 'ysxjb8',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '情感淡漠、哭笑无常',
          id: '9',
          forId: 'ysxjb9',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '言语能力丧失',
          id: '10',
          forId: 'ysxjb10',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '不能完成简单的日常生活事项',
          id: '11',
          forId: 'ysxjb7',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '终日无语我床',
          id: '12',
          forId: 'ysxjb8',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '四肢强直或屈曲瘫痪',
          id: '13',
          forId: 'ysxjb9',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '并发症（如肺部及尿路感染、压疮、全身性衰竭等）',
          id: '14',
          forId: 'ysxjb10',
          checkName: 'currentSymptoms',
          checked: false
        },
        {
          name: '其他',
          id: '15',
          forId: 'ysxjb10',
          checkName: 'currentSymptoms',
          checked: false
        }
      ],
      losecurrentSymptoms:[]
    },
    mounted(){
      //初始化获取数据
      var url = location.search;
      // 获取id
      this.id = url.split('?')[1].split('&')[0].split('=')[1];
      this.getLosewisdomData(this.id);
    },
    methods:{
      getLosewisdomData:function(id) {
        let that = this;
        $.ajax({
          url:"/medical-cloud/lose/wisdom/follow/up/detail",
          dataType:'json',
          type:'post',
          data:{
            id:id
          },
          success:function(data) {
            if (data.data != null) {
              that.losewisdomInfo = data.data;
              that.losecurrentSymptoms = that.losewisdomInfo.currentSymptoms;
              that.currentSymptoms.map(function(val,index,arr){
                var id1 = arr[index].id;
                if(that.losecurrentSymptoms.indexOf(id1) != -1){
                  arr[index].checked = true;
                }else{
                  arr[index].checked = false;
                }
              })
            }
          }
        })
      }
    }
  })

</script>
</body>
</html>